Faxanadu randomizer

version 0.28

randomizes various aspects of the game.

Requires .net framework 4.8

Tested with a Faxanadu (USA) rom. Does not work with the revised edition.

If you have any interest in the randmizer, consider joining our discord:
https://discord.gg/AyJErR8kyV

Please note that With "Shuffle Towers" and "Include Zenis in the tower shuffle" both active, the door that normally leads to Zenis (The Evil One's fortress) will instead be a warp to Eolis.

Features:
    General:
        Fast Text - Makes the text load faster

        Fast Start - You start with Full HP and MP, 1500 golds, and if "randomize keys" is off you also start with the Ring of Elf

        Make equipped Dragon Slayer required - Can't beat the game without the full Battle gear equipped.

        Make Pendant, Magical Rod and Ruby Ring required - Can't beat the game without all of these items

        Move Spring requirement to final requirement - Spring quest must be completed to beat the game, but is not needed to exit Trunk. You still need to push the rock to enter Mist, but only need the ruby ring to do so.

        Shuffle Towers - Tower locations are shuffled. The start area is also considered a tower and is included in the shuffle, so when tower shuffle is on, you will start inside Eolis.

        Update misc text - Update various text related to randomization. One example is that NPCs holding items will tell you what they have if you have not fulfilled their requirement yet.

        Generate Spoiler Log - Generates a .txt file with all item/dungeon locations and other relevant info in it

        Quick seed - The randomizer will try to create a seed that can be beaten more quickly than th3e average seed.

        Allow lowering of respawn value - Make talking to a guru always set your spawn there

        Prevent knockback while on ladders - This will prevent the player from being knocked off ladders when taking damage

        Hints - Changes NPC dialog to add hints for things like item and dungeon locations

        Misc doors - Setting for shuffling some of the non-tower doors, such as outside buildings and possibly town doors.

        World doors - Setting for shuffling the location of the tower doors and misc doors in a world, which can result in towers being in different locations than they normally are.

        World segments - Setting for shuffling segments such as towns. It can shuffle just towns or also include the two middle segments from Trunk and Mist.

        Screen connections - Randomizes how the screens are connected.
            Some connections will always be the same. They are:
                -The screen that's normally 3 screens below the sky spring connects up to the sky spring, with some screens in between
                -Mascon tower is located to the top-left of Mascon
                -The screen below Tower of Suffer connects up to Tower of Suffer
                -The screen below Victim tower connects up to Victim tower
                -the screen below the Mist secret shop connects up to the Mist secret shop
                -The 2 screens that normally lead back from east branch will be connected up/down
                -The Fraternal guru connects up to its vanilla connection
                -The screen with the entrance to Dartmoor city will connect both up and down to its vanilla locations
                -The screen with the door to King Grieves room will connect down to its vanilla location
                -The screen that normally has the Magical Rod will connect down to its vanilla location
            Some of these screens or screens connected to them may also have more than 2 connections.
            Some additional screens will also always have more than 2 connections. They are:
                -The screen that's normally to the right of the entrance to the Battle Helmet wing
                -The screen that's normally 2 screens to the right of the Fortress guru
                -The screen that's normally 2 screens to the left of the Dartmoor exit (which leads to Zenis in the vanilla game)
            It is recommended that you also turn on the "Add kill switch" flag when doing screen randomization as there are places you can softlock if you don't.

        Flexible items - You can equip items inside buildings, but still can't use a sword inside. You can also use items while in the air, and you can always sell items in shops.
        
        Dark towers - The inside of towers will be dark. This tends to make them more challenging.
        
        Randomize Titles - The name, required experience, and gold rewarded for each title will be random.
        
        Add kill switch - Pressing select while the game is paused and then unpausing will kill the player. It is recommended you turn this on when doing screen randomization.
        
        Include Zenis in the tower shuffle - The final dungeon will be shuffled together with other towers. The end of the final world will also lead back to Eolis instead of going to the final dungeon.

    Enemies:
        Randomize Enemy Experience - Enemies give different xp from vanilla

        Randomize Enemy Drops - Enemies drop different things from vanilla (Gold, Bread, or nothing)

        Randomize Enemy Magic Immunities - Enemies can be immune to a spell. (Magic passes through)

        Try to move bosses - The randmizer will try to move bosses so that they are not stuck in the ground.

        Enemy Set - Changes what types of enemies can spawn, and gives some enemies new abilities. 

            No Mixed Enemy Types - Bosses will only appear in vanilla boss locations

            Easy - Some of the harder regular enemies will never spawn, and the boss frequency is low

            Normal - Same as Easy except more hard enemies in the pool and higher boss frequency

            Hard - Same as Normal except more hard enemies in the pool and higher boss frequency. Also upgrades some of the easy enemies to be harder.

            Very Hard - Much more boss enemies and hard regular enemies will appear.

            Extremely Hard - Like Very Hard, but superbosses like King Grieve can appear in normal enemy spawns

            Scaling - Enemies will be harder in later worlds

            Unchanged - No enemy randomization

        Enemy HP - Changes enemy HP values by a random numerical value or percentage value. Affects each enemy type seperately

        Enemy Damage - Changes enemy Damage by a random numerical value or percantage value. Affects each enemy type seperately
        
        Enemy AI - Shuffle the AI used by the enemies. Partial will exclude superbosses like King Grieve and the Evil One from the shuffle but will still randomize their AI.

    Items:
        Elixir near Tower of Fortress - The randomizer will try to ensure that there will be an Elixir near the spring that requires it

        Fix Pendant Bug - Collecting the pendant actually makes you stronger instead of weaker, but also makes it so you are weaker at the start

        Buff Gloves - Increases the glove duration

        Buff Hourglass - The hourglass will no longer take half your HP when used

        Randomize Victim bar rank requirement - Victim barkeep requires a random rank before giving you his item

        Guarantee spell in Eolis - Guarantees a spell in the first town

        Guarantee Mattock near Forepaw - There will be a Mattock somewhere after the breakable wall and before the Trunk exit

        Replace Poison with Mana potions - Introduces a new item (Black Potion) that refills Mana, and removes all Poison from the game, replacing them with Black Potions

        Always spawn small items - Items that normally require the "count" to have a certain value will always spawn when enemies are cleared

        Mattock Usage - Allows Mattock to be used in more places

            Anywhere except banned screens - Mattock can be used anywhere except to break in to the Trunk exit door or to break through to the top or bottom on the Branch double item screen

            Anywhere except banned screens, allow mattock-locked items - Same as above but a key item could be locked in a location requiring at least 1 Mattock

            Anywhere, allow mattock-locked items, Spring quest is considered required - Mattock can be used anywhere, but the spring quest is considered required by the randomizer so you will still be able to get to the next world in the traditional way

            Anywhere, allow mattock-locked items, Spring not required - Mattock can be used anywhere, spring quest is not guaranteed to be completable

            Unchanged - Mattock can only be used in its vanilla locations

        Eolis Weapon - Can set if there is a guaranteed weapon in Eolis

            Random - the first item slot will be either a Dagger or a Longsword

            Dagger - Eolis will have at least a Dagger

            Longsword - Eolis will have at least a Longsword

            Guarantee if Eolis has no spells - Only guaranteed a weapon if you have no access to spells

            Not guaranteed - Eolis may or may not have a weapon, even if there are no spells available

        Wing Boot Duration - Changes how long Wing Boots are active, and how ranking up affects it

            Random - Start with a random time, and a random increase in time every 4 levels

            XX, Scales up with rank - Starts at XX, and increases every 4 ranks

            Permanent - The wing boot timer will be permanent after wing boots are activated. A player death will reset the timer.

            Unchanged - Same as Vanilla (40 seconds at the start, drops 10 seconds every 4 ranks)

        Shields - Changes how shields work

            Shields work with Ointment - Shields no longer cause you to get hit while Ointment is active

            Shields work with Ointment and are stronger - Same as above, but they further reduce Magic damage taken

            Unchanged - Same as Vanilla, getting hit in the shield by magic hurts a little even with Ointment on
            
        Big Items - Sets how "big" items like the dragon slayer spawns. It can be set to always spawn them, or always lock them behind a boss if there is one on the screen
            
        Item Shuffle - Changes how items are shuffled

            Shuffle, mix item types - Overworld items can appear in shops and some shop/gift items can appear on the overworld.
            
            Shuffle, mix only shop and gift items - Overworld items and shop/gift items will be shuffled separately
            
            Shuffle, don' mix most gifts with shops - Key items that are normally gifts will still be gifts, for example the Joker key will not appear in a shop but can still be given by another gifter than vanilla. The "Fire" shop counts as a gift location for this setting.
            
            Unchanged - Items will be vanilla
            
        Key requirements - Changes how key requirements are handled

            Randomize, - Key requirements will be completely random
            
            Shuffle - The vanilla key requirements will be shuffled. This means that for example there will be exactly one door that requires the Ace key
            
            Unchanged - Key requirements will be vanilla
            
        Include some Eolis doors - Include the Eolis magic shop, martial arts shop and exit door in the key randomization

        Small key limit: Limits the number of jack/queen/king keys that can appear. It is for each type individually, so if the limit is set to "2", there could be 2 jack key doors and 2 queen key doors.

        Big key limit: Same as above except for the joker and ace keys.

        Multiple gifts - Can collect as many of the item given as you can hold from the locations listed. Normally if you have one, you cannot receive another. You can always get multiple keys from locations other than the Conflate guru.
        
    Extra
        Randomize palettes - Randomizes the different palettes used for levels
        Randomize sound effects - Randomizes the different sound effects in the game
        Append suffix - Adds a random suffix to the end of the generated filename
        Music - Change the music of the game
            Random - All music will be random
            None - There will be no music at all
            Unchanged - Music is unchanged
            
    Custom Text
        You can provide a text file with custom text for the randomizer to use. Here's an example of how to use it:
            default:This is the default hint
            :This is a community hint
            title:CustomTitle
            6:This is a text for the Eolis meat vendor,| the price will be at the end {0}
        The example above has:
            1 default hint, which is: "This is the default hint"
            1 community hint, which is: "This is a community hint"
            1 custom title, which is: "CustomTitle"
            1 specific text for the Eolis meat vendor, which is: "This is a text for the Eolis meat vendor, the price will be at the end 50" if 50 is the price of meat in Eolis.
            The Eolis meat price text also has a pause in the text at the '|' character.
        There is also an example text file included, CustomTextExample.txt
        Also note that using custom text is not considered part of the "Extra" flags and may change the randomization of a seed.
        The '|' character can be used to insert pauses in the text.
        The default hint is used in various places.
        The community hints are given to a random applicable NPC.
        The custom titles will be shuffled and given at random ranks
        The specific hints are given to a specific location based on the first number before the :, here's some of the available locations to use:
            6:Eolis meat vendor. Needs a {0} for the price.
            7:Forepaw meat vendor. Needs a {0} for the price.
            8:Mascon meat vendor. Needs a {0} for the price.
            9:Victim meat vendor. Needs a {0} for the price.
            10:Conflate meat vendor. Needs a {0} for the price.
            11:Daybreak meat vendor. Needs a {0} for the price.
            12:Dartmoor meat vendor. Needs a {0} for the price.
            20: The Eolis magic shop. Needs a {0} for the price.
            24: The Eolis martial arts shop. Needs a {0} for the price.
            25: The first line from a doctor.
            26: The third line from a doctor.
            27: The third line from the Apolune doctor. Needs a {0} for the price.
            28: The third line from the Forepaw doctor. Needs a {0} for the price.
            29: The third line from the Mascon doctor. Needs a {0} for the price.
            30: The third line from the Victim doctor. Needs a {0} for the price.
            31: The third line from the Conflate doctor. Needs a {0} for the price.
            32: The third line from the Dartmoor doctor. Needs a {0} for the price.
            43: The message from the Eolis guru when he gives an item.
            52: The message from the King when he gives you money.
            53: The message from the King when he does not give you money.
            163: The message from the King when you've defeated the Evil One.
            169: The text when using red potion.
            170: The text when using mattock.
            171: The text when using hour glass.
            172: The text when using wingboots.
            173: The text when using key.
            174: The text when using elixir.
            175: The text when picking up elixir.
            176: The text when picking up red potion.
            177: The text when picking up mattock.
            178: The text when picking up wingboots.
            179: The text when picking up hour glass.
            180: The text when picking up the Battlesuit.
            181: The text when picking up the Battlehelmet.
            182: The text when picking up the Dragon Slayer.
            183: The text when picking up the Black Onyx.
            184: The text when picking up the Pendant.
            185: The text when picking up the Magical Rod.
            186: The text when touching poison.
            187: The text when touching glove.
            189: The text when touching ointment.